<%inherit file="admin/base_site.html"/>

<%namespace name="ra" module="registry.mako.admin"/>
${self.block_stylesheet()}<%def name="block_stylesheet()"><%namespace name="admin" module="django.contrib.admin.templatetags.adminmedia" />${admin_media_prefix()}css/dashboard.css</%def>

${self.block_coltype()}<%def name="block_coltype()">colMS</%def>

${self.block_bodyclass()}<%def name="block_bodyclass()">dashboard</%def>

${self.block_content()}<%def name="block_content()">
<div id="content-main">

% if app_list:
% for app in app_list:
        <div class="module">
        <table summary="<%def name="blocktrans()"><% name = app['name'] %>Models available in the ${name} application.</%def>${blocktrans()}">
        <caption><a href="${app['app_url']}" class="section"><%def name="blocktrans()">${ra.get_application_name(app['name'])}</%def>${blocktrans()}</a></caption>
% for model in app['models']:
            <tr>
% if model['perms']['change']:
                <th scope="row"><a href="${model['admin_url']}">${model['name']}</a></th>
% else:
                <th scope="row">${model['name']}</th>
% endif
% if model['perms']['add']:
                <td><a href="${model['admin_url']}add/" class="addlink">${trans('Add')}</a></td>
% else:
                <td>&nbsp;</td>
% endif
% if model['perms']['change']:
                <td><a href="${model['admin_url']}" class="changelink">${trans('Change')}</a></td>
% else:
                <td>&nbsp;</td>
% endif
            </tr>
% endfor
        </table>
        </div>
% endfor
% else:
    <p>${trans("You don't have permission to edit anything.")}</p>
% endif
</div>
</%def>

${self.block_sidebar()}<%def name="block_sidebar()">
<div id="content-related">
    <%doc>
    <div class="module" id="recent-actions-module">
        <h2>${trans('Recent Actions')}</h2>
        <h3>${trans('My Actions')}</h3>
            
            <%
                from django.contrib.admin.templatetags.log import get_admin_log
            %>
            <% admin_log = get_admin_log(context,user,10) %>
            
% if not admin_log:

            <p>${trans('None available')}</p>
            
% else:

            <ul class="actionlist">
            
% for entry in admin_log:

            <li class="
% if entry.is_addition:
addlink
% endif

% if entry.is_change:
changelink
% endif

% if entry.is_deletion:
deletelink
% endif
">
% if not entry.is_deletion:
<a href="${entry['get_admin_url']}">
% endif
${entry.object_repr}
% if not entry.is_deletion:
</a>
% endif
<br /><span class="mini quiet">${capfirst(trans(entry.content_type))}</span></li>
            
% endfor

            </ul>
            
% endif

    </div>
    </%doc>
</div>
</%def>
